// eslint-disable-next-line
import { UserLayout, BasicLayout, BlankLayout } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

const RouteView = {
    name: 'RouteView',
    render: h => h('router-view')
}

export const asyncRouterMap = [
  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: 'menu.home' },
    redirect: '/overview/overview',
    children: [
      {
        path: '/overview',
        redirect: '/overview/overview',
        name: 'overview',
        component: RouteView,
        meta: { title: '功能界面', keepAlive: true, permission: ['dashboard'] },
        children: [
          {
            path: '/overview/overview',
            name: 'overview2',
            component: () => import('@/views/overview/Overview'),
            meta: { title: '学生信息管理', keepAlive: false, permission: ['dashboard'] }
          },
          {
            path: '/overview/course',
            name: 'course',
            component: () => import('@/views/overview/Course'),
            meta: { title: '课程信息管理', keepAlive: false, permission: ['dashboard'] }
          },

        ]
      },
      // {
      //   path: '/assets',
      //   name: 'assets',
      //   component: RouteView,
      //   meta: { title: '资产管理', keepAlive: true, permission: ['dashboard'] },
      //   children: [
      //     {
      //       path: '/assets/info',
      //       name: 'assetsinfo',
      //       component: () => import('@/views/assetManage/AssetInfo'),
      //       meta: { title: '资产信息', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/assets/group',
      //       name: 'assetsgroup',
      //       component: () => import('@/views/assetManage/AssetGrouping'),
      //       meta: { title: '资产分组设置', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/assets/discovery',
      //       name: 'assetsdiscovery',
      //       component: () => import('@/views/assetManage/AssetDiscovery'),
      //       meta: { title: '资产发现设置', keepAlive: false, permission: ['dashboard'] }
      //     }
      //   ]
      // },
      // {
      //   path: '/patch',
      //   name: 'patch',
      //   component: RouteView,
      //   meta: { title: '补丁管理', keepAlive: true, permission: ['dashboard'] },
      //   children: [
      //     {
      //       path: '/patch/library',
      //       name: 'patchlibrary',
      //       component: () => import('@/views/patchManage/library'),
      //       meta: { title: '补丁库', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/patch/group',
      //       name: 'patchgroup',
      //       component: () => import('@/views/patchManage/GroupingManage'),
      //       meta: { title: '补丁组管理', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/patch/black',
      //       name: 'patchblack',
      //       component: () => import('@/views/patchManage/BlacklistPatch'),
      //       meta: { title: '黑名单补丁', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/patch/update',
      //       name: 'patchupdate',
      //       component: () => import('@/views/patchManage/PatchUpdateManage'),
      //       meta: { title: '补丁更新管理', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/patch/file',
      //       name: 'patchfile',
      //       component: () => import('@/views/patchManage/file'),
      //       meta: { title: '文件库', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/patch/info',
      //       name: 'patchinfo',
      //       component: () => import('@/views/patchManage/PatchInfo'),
      //       meta: { title: '补丁信息', keepAlive: false, permission: ['dashboard'] }
      //     }
      //   ]
      // },
      // {
      //   path: '/policy',
      //   name: 'policy',
      //   component: RouteView,
      //   meta: { title: '策略管理', keepAlive: true, permission: ['dashboard'] },
      //   children: [
      //     {
      //       path: '/policy/test',
      //       name: 'policytest',
      //       component: () => import('@/views/policy/test'),
      //       meta: { title: '测试补丁分发', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/policy/formal',
      //       name: 'policyformal',
      //       component: () => import('@/views/policy/formal'),
      //       meta: { title: '正式补丁分发', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/policy/manmade',
      //       name: 'policymanmade',
      //       component: () => import('@/views/policy/manmade'),
      //       meta: { title: '人工补丁分发', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/policy/normal',
      //       name: 'policynormal',
      //       component: () => import('@/views/policy/normal'),
      //       meta: { title: '普通文件分发', keepAlive: false, permission: ['dashboard'] }
      //     },
      //   ]
      // },
      // {
      //   path: '/systerm',
      //   name: 'systerm',
      //   component: RouteView,
      //   meta: { title: '系统配置', keepAlive: true, permission: ['dashboard'] },
      //   children: [
      //     {
      //       path: '/systerm/commonconfig',
      //       name: 'commonconfig',
      //       component: () => import('@/views/systerm/commonconfig'),
      //       meta: { title: '通用配置', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/systerm/netconfig',
      //       name: 'netconfig',
      //       component: () => import('@/views/systerm/netconfig'),
      //       meta: { title: '网络配置', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/systerm/userconfig',
      //       name: 'userconfig',
      //       component: () => import('@/views/systerm/userconfig'),
      //       meta: { title: '用户配置', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/systerm/safetyconfig',
      //       name: 'safetyconfig',
      //       component: () => import('@/views/systerm/safetyconfig'),
      //       meta: { title: '系统安全', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/systerm/backup',
      //       name: 'backup',
      //       component: () => import('@/views/systerm/backup'),
      //       meta: { title: '备份管理', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/systerm/cascade',
      //       name: 'cascade',
      //       component: () => import('@/views/systerm/cascade'),
      //       meta: { title: '级联配置', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/systerm/warn',
      //       name: 'warn',
      //       component: () => import('@/views/systerm/warn'),
      //       meta: { title: '告警配置', keepAlive: false, permission: ['dashboard'] }
      //     },
      //     {
      //       path: '/systerm/authorize',
      //       name: 'authorize',
      //       component: () => import('@/views/systerm/authorize'),
      //       meta: { title: '授权管理', keepAlive: false, permission: ['dashboard'] }
      //     }
      //   ]
      // },
    ]
  }
  ,
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
    {
        path: '/user',
        component: UserLayout,
        redirect: '/user/login',
        hidden: true,
        children: [
            {
                path: 'login',
                name: 'login',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
            },
            {
                path: 'register',
                name: 'register',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
            },
            {
                path: 'register-result',
                name: 'registerResult',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
            },
            {
                path: 'recover',
                name: 'recover',
                component: undefined
            }
        ]
    },
    {
        path: '/404',
        component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
    }
]
